package regexobject;

public class ReplaceAllDemo {
    public static void main(String[] args) {
        String line = "abc123dflkfs542dsd1kjk111s";
        line = line.replaceAll("[0-9]+","#");
        System.out.println(line);
        String line1 = "abc123dflkfs542dsd1kjk111s";
        line1 = line1.replaceAll("[0-9]","#");//如果不加+号
        System.out.println(line1);
    }
}
